package factory;

import entity.CreditCard;
import entity.DiscoverCC;
/**
 * 弃用
 */
@Deprecated
public class DiscoverFactory implements CreditCardFactory {
    private static DiscoverFactory instance = null;
    private DiscoverFactory() {
    }
    public static DiscoverFactory getInstance() {
        if (instance == null) {
            instance = new DiscoverFactory();
        }
        return instance;
    }
    @Override
    public CreditCard createCard(String cardNumber, String holderName) {
        return new DiscoverCC()
                .setNumber(cardNumber)
                .setHolderName(holderName)
                .build();
    }
}
